<template>
  <div>
    <head-page title="人才库" id="backstyle"></head-page>
    <div class="boa">
      <Banner id="2" class="bannerId"></Banner>
      <!-- 版心区域 -->
      <div class="text title-center l-h">
        {{ title }}
      </div>
      <div class="area-center">
        <!-- 人才库区域 -->
        <div class="top">
          <!-- 用户单位文字区域 -->
          <div class="umit title-center">
            <div
              class="xiao flex aic m-t-07"
              v-for="(item, index) in list"
              :key="index"
              @click="personclass(item, title, index + 1)"
            >
              <div class="left">
                <div class="no fcc">{{ index + 1 }}.</div>
              </div>
              <div class="zhong">
                {{ item.typeName }}
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Banner from "@/components/Home/BannerView.vue";
import { talType } from "@/api/index";
export default {
  data() {
    return {
      list: [],
      title: this.$route.query.title,
    };
  },
  components: {
    Banner,
  },
  mounted() {
    talType().then((res) => {
      let data = res.data;
      if (data.code == 200) {
        this.list = data.rows;
      }
    });
  },
  methods: {
    //人才库的分类
    personclass(item, title, index) {
      this.$router.push({
        path: "/personclass",
        query: {
          provincial: this.$route.query.id,
          typeId: item.typeId,
          typeName: item.typeName,
          title,
          index,
        },
      });
      // console.log(i);
    },
  },
};
</script>

<style scoped>
.boa {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.text {
  width: 100%;
  text-align: center;

}

/* 访谈和电视总区域 */
.top {
  width: 100%;
}

/* 用人单位区域 */
.umit {
  width: 100%;
  min-height: 0.4rem;
}
.xiao {
  width: 100%;
  display: flex;
}
/* 左边区域 */
.xiao .left {
  width: 5%;
  height: 100%;
  margin-left: 0.1rem;
}
.xiao .left img {
  width: 0.17rem;
  height: 0.3rem;
}
.xiao .no {
  width: 0.17rem;
  height: 0.17rem;
  border-radius: 50%;
  margin-top: 1px;
  font-size: 20px;
}
/* 中间区域 */
.zhong {
  width: 95%;
  height: 100%;
  line-height: 0.3rem;
}
/* 底部区域 */
.bottom {
  width: 100%;
  height: 100%;
  margin-top: 0.1rem;
  background-color: pink;
}

.bottom h3 {
  width: 100%;
  height: 0.35rem;
  text-align: center;
  background-color: coral;
}
/* 内容区域 */
.context {
  width: 100%;
  height: 1rem;
  font-weight: 700;
  background-color: darkkhaki;
}
</style>